home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / ogrid100.zip / DEMOMAKE.PAS < prev    next >
Pascal/Delphi Source File  |  1994-12-29  |  20KB  |  474 lines

  1. {*****************************************************************************
  2.  
  3.   OOGrid Library(TM) v1.0 for Borland/Turbo Pascal (Real Mode/TV)
  4.   Copyright (C) 1994 by Arturo J. Monge
  5.   Portions Copyright (C) 1989,1990 Borland International, Inc.
  6.  
  7.   OOGrid Library(TM) Make Demo Resources program:
  8.     Creates the resource file used by DEMO_GL.PAS.  Example of
  9.     how to use the resource functions in GLTVR_US.PAS.
  10.  
  11.   Last Modification : December 29th, 1994
  12.  
  13. *****************************************************************************}
  14.  
  15. program DemoMake;
  16.  
  17. uses Objects, Drivers, Menus, Views, Dialogs, StdDlg, GLViews, GLEquate,
  18.      GLTVR_US, DemoEqu;
  19.  
  20. var
  21.   ResFile : TResourceFile;
  22.  
  23. {** Resource Procedures **}
  24.  
  25. procedure CreateStrings;
  26. var
  27.   S: PStrListMaker;
  28. begin
  29.   S := New(PStrListMaker, Init(10000, 100));
  30.  
  31. { Menu Hints }
  32.  
  33.   S^.Put(hcYes, 'Perform the action');
  34.   S^.Put(hcNo, 'Do not perform the action');
  35.   S^.Put(hcOk, 'Accept the settings in this dialog');
  36.   S^.Put(hcCancel, 'Close the dialog box without making any changes.');
  37.   S^.Put(hcDeleteWin, 'Delete from the desktop the selected window');
  38.   S^.Put(hcWinList, 'Use the cursor keys to examine the window list');
  39.   S^.Put(hcFileMenu, 'File management commands (New, Open, Save, etc.)');
  40.   S^.Put(hcNewSheet, 'Create an empty spreadsheet in a new window');
  41.   S^.Put(hcOpen, 'Locate and open a saved spreadsheet');
  42.   S^.Put(hcSave, 'Save the current spreadsheet');
  43.   S^.Put(hcSaveAs, 'Save the current spreadsheet under a different name');
  44.   S^.Put(hcPrintSheet, 'Print the current spreadsheet');
  45.   S^.Put(hcClose, 'Close the current spreadsheet');
  46.   S^.Put(hcCloseAll, 'Close all open spreadsheets');
  47.   S^.Put(hcDosShell, 'Temporarily exit to DOS');
  48.   S^.Put(hcQuit, 'Close the application and return to DOS');
  49.   S^.Put(hcEditMenu, 'Edit commands');
  50.   S^.Put(hcGoto, 'Move the cursor to a different cell in the spreadsheet');
  51.   S^.Put(hcEditCell, 'Edit the data in the highlighted cell');
  52.   S^.Put(hcCopy, 'Copy the selected cells to a different position');
  53.   S^.Put(hcMove, 'Move the selected cells to a different position');
  54.   S^.Put(hcClear, 'Erase the data of the selected cells');
  55.   S^.Put(hcPaste, 'Paste the selected cells where indicated by the cursor');
  56.   S^.Put(hcSpreadSheetMenu, 'Spreadsheet managenent commands');
  57.   S^.Put(hcFormatCells, 'Format the selected cells');
  58.   S^.Put(hcRecalc, 'Recalculate the values of all the cells');
  59.   S^.Put(hcToggleAutoCalc, 'Turn on/off the autocalc mode');
  60.   S^.Put(hcToggleFormulas, 'Turn on/off display of formulas');
  61.   S^.Put(hcToggleHeaders, 'Turn on/off display of custom assigned headers');
  62.   S^.Put(hcProtectionMenu, 'Spreadsheet protection commands');
  63.   S^.Put(hcToggleProtection, 'Turn on/off spreadsheet protection');
  64.   S^.Put(hcSetUnlocked, 'Mark the selected cells as unlocked');
  65.   S^.Put(hcSetLocked, 'Mark the selected cells as locked');
  66.   S^.Put(hcColumnMenu, 'Column management commands');
  67.   S^.Put(hcInsertColumns, 'Insert a column in the indicated position');
  68.   S^.Put(hcDeleteColumns, 'Delete the selected columns');
  69.   S^.Put(hcChangeHeaders, 'Custom assign a header to the selected columns');
  70.   S^.Put(hcDeleteHeaders, 'Delete custom assigned headers of the selected columns');
  71.   S^.Put(hcRowMenu, 'Row management commands');
  72.   S^.Put(hcInsertRows, 'Insert a row in the indicated position');
  73.   S^.Put(hcDeleteRows, 'Delete the selected rows');
  74.   S^.Put(hcSortData, 'Sort by columns the data in the spreadsheet');
  75.   S^.Put(hcWindowMenu, 'Window management commands');
  76.   S^.Put(hcTile, 'Arrange windows on desktop by tiling');
  77.   S^.Put(hcCascade, 'Arrange windows on desktop by cascading');
  78.   S^.Put(hcVideoMode, 'Toggle between 25 and 43/50 lines');
  79.   S^.Put(hcList, 'List all open windows on the desktop');
  80.   S^.Put(hcZoom, 'Enlarge or restore the size of the active window');
  81.   S^.Put(hcResize, 'Change the size or position of the active window');
  82.   S^.Put(hcNext, 'Make the next window active');
  83.   S^.Put(hcPrev, 'Make the previous window active');
  84.   S^.Put(hcLoadLicense, 'File containg important information (must read!)');
  85.   S^.Put(hcLoadTypes, 'Examples of the different cell type supported');
  86.   S^.Put(hcLoadFunctions, 'Examples of the different functions supported');
  87.   S^.Put(hcLoadList1, 'File explaining the use of headers and the sort method');
  88.   S^.Put(hcLoadList2, 'Example list (file EX_List2)');
  89.   S^.Put(hcLoadErrors, 'Examples of errors that can be detected');
  90.   S^.Put(hcLoadDataEntry, 'Examples of data entry screens');
  91.   S^.Put(hcLoadOOGL2, 'Information about next releases');
  92.   S^.Put(hcExampleFilesMenu, 'Example files documenting TSpreadSheet''s features');
  93.   S^.Put(hcRefresh, 'Redraw the screen');
  94.   S^.Put(hcInfoMenu, 'Copyrights, how to contact the author, etc.');
  95.   S^.Put(hcAbout, 'Copyright information');
  96.   S^.Put(hcAuthorInfo, 'Information about how to contact the author');
  97.   S^.Put(hcRegister, 'Registration information');
  98.   S^.Put(hcInfoDialog, 'Thanks for using OOGrid Library(TM) v1.0!');
  99.   S^.Put(hcChDir, 'Choose a new default directory...');
  100.  
  101.  
  102. { TSpreadSheet's Dialogs' Hints }
  103.  
  104.   S^.Put(hcBottomMargin, 'Lines to be left empty at the bottom of the page');
  105.   S^.Put(hcChangeHeaderInput, 'Enter the new custom header for the columns(s)');
  106.   S^.Put(hcCondensedCols, 'Number columns a page has in condensed size print mode');
  107.   S^.Put(hcCurrencyChar, 'Enter the character of the desired currency');
  108.   S^.Put(hcDecimalPlaces, 'Enter the desired number of decimal places of numbers');
  109.   S^.Put(hcFirstKey, 'The selected list will be sorted with this key first');
  110.   S^.Put(hcFormatDefault, 'Clears any custom assigned format of the selected cells');
  111.   S^.Put(hcGetWidthInput, 'Enter the new width for the column(s)');
  112.   S^.Put(hcGoToCellInput, 'Enter destination cell');
  113.   S^.Put(hcInputLine, 'Enter the data ( use a space before entering text )');
  114.   S^.Put(hcLeftMargin, 'Columns to be left empty at the left of the page');
  115.   S^.Put(hcNormalCols, 'Number of columns a page has in normal size print mode');
  116.   S^.Put(hcPageRows, 'Number of rows a page has');
  117.   S^.Put(hcRightMargin, 'Columns to be left empty at the right of the page');
  118.   S^.Put(hcSecondKey, 'Sort key used if two first keys are indentical');
  119.   S^.Put(hcThirdKey, 'Sort key used if two second keys are identical');
  120.   S^.Put(hcTopMargin, 'Lines to be left empty at the top of the page');
  121.   S^.Put(hcCopyColLiteral, 'Do not modify column references to reflect new position');
  122.   S^.Put(hcCopyRowLiteral, 'Do not modify row references to reflect new position');
  123.   S^.Put(hcCurrencyFormat, 'Show number with the indicated currency character');
  124.   S^.Put(hcPutCommasInNumbers, 'Put commas in the numbers');
  125.   S^.Put(hcJustLeft, 'Place the data at the left of the column');
  126.   S^.Put(hcJustCenter, 'Place the data at the center of the column');
  127.   S^.Put(hcJustRight, 'Place the data at the right of the column');
  128.   S^.Put(hcPrintToPrinter, 'Send output to printer device (PRN)');
  129.   S^.Put(hcPrintToFile, 'Send output to a file');
  130.   S^.Put(hcPrintNormal, 'Print the file in normal size mode');
  131.   S^.Put(hcPrintCondensed, 'Print the file in condensed size mode');
  132.   S^.Put(hcPrintRowsNo, 'Do not print row numbers');
  133.   S^.Put(hcPrintRowsLeft, 'Print row numbers only in pages at the left');
  134.   S^.Put(hcPrintRowsAlways, 'Print row numbers in all pages');
  135.   S^.Put(hcPrintColsNo, 'Do not print column headers');
  136.   S^.Put(hcPrintColsTop, 'Print column headers only in pages at the top');
  137.   S^.Put(hcPrintColsAlways, 'Print column headers in all pages');
  138.   S^.Put(hcLineOutline, 'Draw a row outline');
  139.   S^.Put(hcBoldBorders, 'Print column headers and row numbers in bold characters');
  140.   S^.Put(hcAscending, 'Sort the list in ascending order');
  141.   S^.Put(hcDescending, 'Sort the list in descending order');
  142.   S^.Put(hcPleaseWait, 'This may take some time... please wait');
  143.  
  144. { Message Strings }
  145.  
  146.   S^.Put(sHelpAccessError, 'Could not open help file.');
  147.   S^.Put(sNoMemError, 'There is not enough memory to continue operation.');
  148.   S^.Put(sShellMsg, 'Type EXIT to return to application...');
  149.   S^.Put(sNoNameFileName, 'NONAME');
  150.   S^.Put(sMaxFilesOpenError, 'Cannot open more files!');
  151.   S^.Put(sFileNotFound, 'File not found.');
  152.   S^.Put(sInvalidFormat, 'The file does not have a valid format.');
  153.   S^.Put(sAccessError, 'An error ocurred while accessing the file.');
  154.   S^.Put(sCreateStreamError, 'Could not create file.');
  155.   S^.Put(sSaveError, 'Error while saving file.');
  156.   S^.Put(sLoadMessage, 'Loading file... please wait.');
  157.   S^.Put(sSaveMessage, 'Saving file... please wait.');
  158.  
  159.   ResFile.Put(S, 'Strings');
  160.   Dispose(S, Done);
  161. end; {...CreateStrings }
  162.  
  163. procedure MakeMenuBar;
  164. var
  165.   R: TRect;
  166.   M: PMenuBar;
  167. begin
  168.   R.Assign(0,0,80,1);
  169.   M := New(PMenuBar, Init(R, NewMenu(
  170.     NewSubMenu('~F~ile', hcFileMenu, NewMenu(
  171.       NewItem('~N~ew', 'Alt-N', kbAltN, cmNewSheet, hcNewSheet,
  172.       NewItem('~O~pen', 'F3', kbF3, cmOpen, hcOpen,
  173.       NewItem('~S~ave', 'F2', kbF2, cmSave, hcSave,
  174.       NewItem('Save ~a~s', '', kbNoKey, cmSaveAs, hcSaveAs,
  175.       NewLine(
  176.       NewItem('~C~hange dir...', '', kbNoKey, cmChDir, hcChDir,
  177.       NewItem('~P~rint', 'Shift-F7', kbShiftF7, cmPrintSheet, hcPrintSheet,
  178.       NewLine(
  179.       NewItem('~D~os Shell...', '', kbNoKey, cmDosShell, hcDosShell,
  180.       NewItem('E~x~it', 'Alt-X', kbAltX, cmQuit, hcQuit,
  181.       NIL))))))))))),
  182.     NewSubMenu('~E~dit', hcEditMenu, NewMenu(
  183.       NewItem('~G~o to', 'Ctrl-Home', kbCtrlHome, cmGoToCell, hcGoTo,
  184.       NewItem('~E~dit cell', 'F1', kbF1, cmEditCell, hcEditCell,
  185.       NewLine(
  186.       NewItem('~C~opy', 'Ctrl-Ins', kbCtrlIns, cmCopy, hcCopy,
  187.       NewItem('~M~ove', 'Shift-Del', kbShiftDel, cmCut, hcMove,
  188.       NewItem('C~l~ear', 'Ctrl-Del', kbCtrlDel, cmClear, hcClear,
  189.       NewItem('~P~aste', 'Shift-Ins', kbShiftIns, cmPaste, hcPaste,
  190.       NIL)))))))),
  191.     NewSubMenu('~S~preadsheet', hcSpreadSheetMenu, NewMenu(
  192.       NewItem('~C~ell format', 'Shift-F1', kbShiftF1, cmFormatCells, hcFormatCells,
  193.       NewItem('~F~ormat default', '', kbNoKey, cmFormatDefault, hcFormatDefault,
  194.       NewLine(
  195.       NewItem('~R~ecalc', 'F9', kbF9, cmRecalc, hcRecalc,
  196.       NewItem('Toggle ~a~utocalc', 'Shift-F9', kbShiftF9, cmToggleAutocalc, hcToggleAutocalc,
  197.       NewItem('Toggle ~f~ormulas', 'Ctrl-F10', kbCtrlF10, cmToggleFormulas, hcToggleFormulas,
  198.       NewItem('Toggle ~h~eaders', 'Shift-F10', kbShiftF10, cmToggleHeaders, hcToggleHeaders,
  199.       NewSubMenu('~P~rotection', hcProtectionMenu, NewMenu(
  200.         NewItem('Toggle ~p~rotection', 'Alt-P', kbAltP, cmToggleProtection, hcToggleProtection,
  201.         NewItem('Set ~u~nlocked', 'Alt-U', kbAltU, cmSetUnlocked, hcSetUnlocked,
  202.         NewItem('Set ~l~ocked', 'Alt-L', kbAltL, cmSetLocked, hcSetLocked,
  203.         NIL)))),
  204.       NewLine(
  205.       NewSubMenu('C~o~lumn', hcColumnMenu, NewMenu(
  206.         NewItem('~I~nsert', 'Ctrl-F4', kbCtrlF4, cmInsertColumns, hcInsertColumns,
  207.         NewItem('~D~elete', 'Alt-F4', kbAltF4, cmDeleteColumns, hcDeleteColumns,
  208.         NewItem('~C~hange width', 'F7', kbF7, cmChangeColWidth, hcChangeColWidth,
  209.         NewItem('C~h~ange header', 'Ctrl-F7', kbCtrlF7, cmChangeColHeaders, hcChangeHeaders,
  210.         NewItem('~D~elete header', '', kbNoKey, cmDeleteColHeaders, hcDeleteHeaders,
  211.         NIL)))))),
  212.       NewSubMenu('Ro~w~', hcRowMenu, NewMenu(
  213.         NewItem('~I~nsert', 'Ctrl-F8', kbCtrlF8, cmInsertRows, hcInsertRows,
  214.         Newitem('~D~elete', 'Alt-F8', kbAltF8, cmDeleteRows, hcDeleteRows,
  215.         NIL))),
  216.       NewLine(
  217.       NewItem('~S~ort data', 'F4', kbF4, cmSortData, hcSortData,
  218.       NIL)))))))))))))),
  219.     NewSubMenu('Ex~a~mple Files', hcExampleFilesMenu, NewMenu(
  220.       NewItem('~L~icense', '', kbNoKey, cmLoadLicense, hcLoadLicense,
  221.       NewItem('~C~ell Types', '', kbNoKey, cmLoadTypes, hcLoadTypes,
  222.       NewItem('~F~unctions', '', kbNoKey, cmLoadFunctions, hcLoadFunctions,
  223.       NewItem('L~i~st', '', kbNoKey, cmLoadList1, hcLoadList1,
  224.       NewItem('List ~e~xample', '', kbNoKey, cmLoadList2, hcLoadList2,
  225.       NewItem('E~r~rors', '', kbNoKey, cmLoadErrors, hcLoadErrors,
  226.       NewItem('~D~ata entry', '', kbNoKey, cmLoadDataEntry, hcLoadDataEntry,
  227.       NewItem('~N~ext releases', '', kbNoKey, cmLoadOOGL2, hcLoadOOGL2,
  228.       NIL))))))))),
  229.     NewSubMenu('~W~indow', hcWindowMenu, NewMenu(
  230.       NewItem('~T~ile', '', kbNoKey, cmTile, hcTile,
  231.       NewItem('C~a~scade', '', kbNoKey, cmCascade, hcCascade,
  232.       NewItem('~C~lose', 'Alt-F3', kbAltF3, cmClose, hcClose,
  233.       NewItem('Cl~o~se all', '', kbNoKey, cmCloseAll, hcCloseAll,
  234.       NewItem('~R~efresh display', '', kbNoKey, cmRefresh, hcRefresh,
  235.       NewLine(
  236.       NewItem('~S~ize/Move', 'Ctrl-F5', kbCtrlF5, cmResize, hcResize,
  237.       NewItem('~Z~oom', 'F5', kbF5, cmZoom, hcZoom,
  238.       NewItem('~N~ext', 'F6', kbF6, cmNext, hcNext,
  239.       NewItem('~P~revious', 'Shift-F6', kbShiftF6, cmPrev, hcPrev,
  240.       NewLine(
  241.       NewItem('~V~ideo Mode', '', kbNoKey, cmVideoMode, hcVideoMode,
  242.       NewItem('~L~ist', 'Alt-0', kbAlt0, cmList, hcList,
  243.       NIL)))))))))))))),
  244.     NewSubMenu('~I~nfo', hcInfoMenu, NewMenu(
  245.       NewItem('~A~bout...', 'Alt-F1', kbAltF1, cmAbout, hcAbout,
  246.       NewItem('A~u~thor...', '', kbNoKey, cmAuthorInfo, hcAuthorInfo,
  247.       NewItem('~R~egistration', '', kbNoKey, cmRegister, hcRegister,
  248.       NIL)))),
  249.     NIL)))))))));
  250.  
  251.   ResFile.Put(M, 'MenuBar');
  252.   Dispose(M, Done);
  253. end; {...MakeMenuBar }
  254.  
  255. procedure MakeLoadDialog;
  256. var
  257.   Dialog : PFileDialog;
  258. begin
  259.   Dialog := New(PFileDialog, Init('*.OGL', 'Open a file...', '~N~ame',
  260.     fdOkButton + fdHelpButton + fdNoLoadDir, 1));
  261.  
  262.   ResFile.Put(Dialog, 'LoadDialog');
  263.   Dispose(Dialog, Done);
  264. end; {...MakeLoadDialog }
  265.  
  266. procedure MakeChDirDialog;
  267. var
  268.   Dialog : PChDirDialog;
  269. begin
  270.   Dialog := New(PChDirDialog, Init(cdHelpButton + cdNoLoadDir, 3));
  271.  
  272.   ResFile.Put(Dialog, 'ChDirDialog');
  273.   Dispose(Dialog, Done);
  274. end; {...MakeChDirDialog }
  275.  
  276. procedure MakeSaveDialog;
  277. var
  278.   Dialog : PFileDialog;
  279. begin
  280.   Dialog := New(PFileDialog, Init('*.OGL', 'Save as...', '~S~ave as',
  281.     fdOkButton + fdHelpButton + fdNoLoadDir, 2));
  282.  
  283.   ResFile.Put(Dialog, 'SaveDialog');
  284.   Dispose(Dialog, Done);
  285. end; {...MakeLoadDialog }
  286.  
  287.  
  288. procedure MakeAboutDialog;
  289. var
  290.   Dlg : PDialog;
  291.   R : TRect;
  292.   Control, HScroll : PView;
  293. Begin
  294.   R.Assign(17,4,62,19);
  295.   New(Dlg, Init(R, 'About...'));
  296.   Dlg^.HelpCtx := hcInfoDialog;
  297.   Dlg^.Options := $0343;
  298.  
  299.   R.Assign(2,2,43,12);
  300.   Control := New(PStaticText, Init(R, ^C'OOGrid Library(TM) v1.0'^M+
  301.      ^C'for Borland/Turbo Pascal (Real Mode/TV)'^M+
  302.      ^C''^M+
  303.      ^C'Copyright (C) 1994'^M+
  304.      ^C'by Arturo J. Monge'^M+
  305.      ^C''^M+
  306.      ^C'Portions Copyright (C) 1989,1990'^M+
  307.      ^C'by Borland International, Inc.'^M+
  308.      ^C''));
  309.   Dlg^.Insert(Control);
  310.  
  311.   R.Assign(16,12,28,14);
  312.   Control := New(PButton, Init(R, 'O~k~', cmOk, bfNormal));
  313.   Dlg^.Insert(Control);
  314.  
  315.   Dlg^.SelectNext(False);
  316.  
  317.   ResFile.Put(Dlg, 'AboutDialog');
  318.   Dispose(Dlg, Done);
  319. end;
  320.  
  321. procedure MakeAuthorDialog;
  322. var
  323.   Dlg : PDialog;
  324.   R : TRect;
  325.   Control, HScroll : PView;
  326. Begin
  327. R.Assign(3,2,76,20);
  328. New(Dlg, Init(R, 'How to contact the author...'));
  329. Dlg^.HelpCtx := hcInfoDialog;
  330. Dlg^.Options := $0343;
  331.  
  332. R.Assign(2,2,71,6);
  333. Control := New(PStaticText, Init(R, 'Please feel free to contact the author '+
  334.      'at any time to share your comments about this software and/or licensin'+
  335.      'g policies, to ask any questions about the use of this library and (pl'+
  336.      'ease!) to report any bugs you may find.'));
  337. Dlg^.Insert(Control);
  338.  
  339. R.Assign(2,7,28,8);
  340. Control := New(PStaticText, Init(R, 'HOW TO CONTACT THE AUTHOR:'));
  341. Dlg^.Insert(Control);
  342.  
  343. R.Assign(2,9,42,12);
  344. Control := New(PStaticText, Init(R, 'E-Mail:'^M+
  345.      '  INTERNET: mongev@cariari.ucr.ac.cr '^M+
  346.      '  FREENET:  fh441@cleveland.freenet.edu'));
  347. Dlg^.Insert(Control);
  348.  
  349. R.Assign(44,9,71,13);
  350. Control := New(PStaticText, Init(R, 'Mail:'^M+
  351.      '  Arturo J. Monge'^M+
  352.      '  SJO 1684; POB 025216'^M+
  353.      '  Miami, FL 33102-5216'));
  354. Dlg^.Insert(Control);
  355.  
  356. R.Assign(2,14,42,16);
  357. Control := New(PStaticText, Init(R, 'Sending correspondence via electronic m'+
  358.      'ail is strongly preferred.'));
  359. Dlg^.Insert(Control);
  360.  
  361. R.Assign(53,15,66,17);
  362. Control := New(PButton, Init(R, 'O~k~', cmOk, bfDefault));
  363. Dlg^.Insert(Control);
  364.  
  365. Dlg^.SelectNext(False);
  366.  
  367. ResFile.Put(Dlg, 'AuthorDialog');
  368. Dispose(Dlg, Done);
  369. end;
  370.  
  371. procedure MakeRegistrationDialog;
  372. var
  373.   Dlg : PDialog;
  374.   R : TRect;
  375.   Control, HScroll : PView;
  376. Begin
  377. R.Assign(3,1,77,21);
  378. New(Dlg, Init(R, 'Registration Information...'));
  379. Dlg^.HelpCtx := hcInfoDialog;
  380. Dlg^.Options := $0343;
  381.  
  382. R.Assign(2,2,72,4);
  383. Control := New(PStaticText, Init(R, 'OOGrid Library(TM) v1.0 is being distri'+
  384.      'buted as freeware (see the License Agreement). However, if you like OO'+
  385.      'Grid Library(TM) v1.0'^M+
  386.      ''));
  387. Dlg^.Insert(Control);
  388.  
  389. R.Assign(2,4,72,7);
  390. Control := New(PStaticText, Init(R, 'and continue to use it, or if you don'''+
  391.      't like it for some reason but you would be interested in using an impr'+
  392.      'oved version, the author would greatly appreciate it you registering a'+
  393.      's a user of this software.'));
  394. Dlg^.Insert(Control);
  395.  
  396. R.Assign(2,8,70,12);
  397. Control := New(PStaticText, Init(R, 'To register, simply send the author a l'+
  398.      'etter or an e-mail message with the following information:'^M+
  399.      ' a. Name, Company Name, mail address and e-mail address (if any)'^M+
  400.      ' b. Pascal Compiler version being used'^M+
  401.      '  '));
  402. Dlg^.Insert(Control);
  403.  
  404. R.Assign(2,12,70,15);
  405. Control := New(PStaticText, Init(R, ' c. What you like about OOGrid Library('+
  406.      'TM) v1.0          (optional)'^M+
  407.      ' d. What you dislike about OOGrid Library(TM) v1.0       (optional)'^M+
  408.      ' e. What would you like to see in OOGrid Library(TM) v2.0 '));
  409. Dlg^.Insert(Control);
  410.  
  411. R.Assign(2,15,70,16);
  412. Control := New(PStaticText, Init(R, '    (for Real Mode/TV, Protected Mode/T'+
  413.      'V and for OWL)    (optional)'));
  414. Dlg^.Insert(Control);
  415.  
  416. R.Assign(57,17,70,19);
  417. Control := New(PButton, Init(R, 'O~k~', cmOk, bfDefault));
  418. Dlg^.Insert(Control);
  419.  
  420. R.Assign(2,17,30,18);
  421. Control := New(PStaticText, Init(R, 'Thank you for your support!'));
  422. Dlg^.Insert(Control);
  423.  
  424. Dlg^.SelectNext(False);
  425.  
  426. ResFile.Put(Dlg, 'RegistrationDialog');
  427. Dispose(Dlg, Done);
  428. end; {... MakeRegistrationDialog }
  429.  
  430. const
  431.   ResourceFileName = 'DEMO_GL.TVR';
  432.  
  433. {****************************************************************************}
  434. {                               MAIN PROGRAM                                 }
  435. {****************************************************************************}
  436.  
  437. begin
  438.   RegisterDialogs;
  439.   RegisterViews;
  440.   RegisterGLViews;
  441.   RegisterStdDlg;
  442.   RegisterMenus;
  443.   RegisterType(RStrListMaker);
  444.  
  445.   write('Creating resource file...');
  446.   ResFile.Init(New(PBufStream, Init(ResourceFileName, stCreate, 1024)));
  447.   if ResFile.Stream^.Status <> stOk then
  448.   begin
  449.     writeln;
  450.     writeln ('Error creating the resource file... program aborted.');
  451.     halt(1);
  452.   end; {...if ResFile.Stream^.Status <> stOk }
  453.  
  454.   CreateStrings;
  455.   MakeMenuBar;
  456.   MakeLoadDialog;
  457.   MakeSaveDialog;
  458.   MakeAboutDialog;
  459.   MakeAuthorDialog;
  460.   MakeChDirDialog;
  461.   MakeRegistrationDialog;
  462.   CreateOOGLDialogs(@ResFile);
  463.   CreateOOGLStrings(@ResFile);
  464.  
  465.   if ResFile.Stream^.Status <> stOk then
  466.   begin
  467.     writeln;
  468.     writeln ('Error adding the resources... program aborted.');
  469.     halt(1);
  470.   end; {...if ResFile.Stream^.Status <> stOk }
  471.  
  472.   ResFile.Done;
  473.   writeln('done');
  474. end. {...Program DemoMake }